package com.rxyb.auth.feign.user;

import com.rxyb.auth.pojo.user.GetRoleListReq;
import com.rxyb.auth.pojo.user.GetRoleListRsp;
import com.rxyb.auth.pojo.user.LoginReq;
import com.rxyb.auth.pojo.user.LoginRsp;
import com.rxyb.core.respone.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author YJH
 * @version 1.0
 * @description 访问用户系统
 * @date 2020/5/21  17:35
 */
@FeignClient(name = "client-authority")
public interface UserFeignServer {

    @PostMapping(value = "/user/login", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    R<LoginRsp> login(@RequestBody LoginReq req);

    @PostMapping(value = "/role/list", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    R<GetRoleListRsp> rolelist(@RequestBody GetRoleListReq getRoleListReq);

}
